<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>档期管理-个人中心-魔步网</title>
<?php include_once(VIEWPATH."public/header_title.php");?>
<link href="<?php echo _get_cfg_path('css')?>base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('css')?>common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('lib')?>uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="js/DD_belatedPNG.js" type="text/javascript" ></script>
<script>DD_belatedPNG.fix('a,img');</script>
<![endif]-->
</head>
<body>
<?php include_once(VIEWPATH."public/header.php");?>
<div class="mainbody" id="mainbody">
    <div class="container mrgB30">
        <div class="member clearfix">
            <?php include_once(VIEWPATH."m/public/left_menu.php");?>
            <div class="fr uc_content">
            	<?php include_once(VIEWPATH."m/public/notice.php");?>
                <div class="clearfix uitopg">
                    <div class="transa">
                        <div class="aut_bti clearfix">
                          <h3 class="fl"><?php if (isset($user_info)&&$user_info):?><a href="/i/index/<?=$agid?>" style="color:blue;text-decoration:underline;margin-left:5px;margin-right:5px;" target="_blank"><?=$user_info['nickname']?></a>的<?php endif;?>档期管理</h3>
              <a class="fr addto TX-win-open-schedule" href="javascript:;"><i></i>添加档期</a>
                        </div>
                        <table class="tran_tab" width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <th width="150"><a <?php if (!isset($arrParam['time_sort'])):?>style="color:white;"<?php endif;?> href="?time_sort=<?=isset($arrParam['time_sort'])&&$arrParam['time_sort']==1?2:1?>">档期时间<?php if (isset($arrParam['time_sort'])):?><img src="<?php echo _get_cfg_path('images')?><?php if ($arrParam['time_sort']==1):?>sort_asc<?php else:?>sort_desc<?php endif;?>.png"/><?php endif;?></a></th>
                              <th>时间区间</th>
                              <th><a <?php if (!isset($arrParam['type_sort'])):?>style="color:white;"<?php endif;?> href="?type_sort=<?=isset($arrParam['type_sort'])&&$arrParam['type_sort']==1?2:1?>">类型<?php if (isset($arrParam['type_sort'])):?><img src="<?php echo _get_cfg_path('images')?><?php if ($arrParam['type_sort']==1):?>sort_asc<?php else:?>sort_desc<?php endif;?>.png"/><?php endif;?></a></th>
                              <th>行程</th>
                              <th width="200">编辑时间</th>
                              <th width="140">操作</th>
                            </tr>
                            <?php foreach ($list['rows'] as $key => $a): ?>
                            <tr>
                              <td>
                              开始时间:<?php echo date('Y-m-d', $a['dodate'])?><br/>
                              结束时间:<?php echo empty($a['enddate']) ? date('Y-m-d', $a['dodate']) : date('Y-m-d', $a['enddate']);?>    
                              </td>
                              <td>
                                <?php 
                                    if ($a['time_zone'] == 1)
                                    {
                                        echo '上午';
                                    }
                                    elseif ($a['time_zone'] == 2)
                                    {
                                        echo '下午';
                                    }
                                    elseif ($a['time_zone'] == 3)
                                    {
                                        echo '晚上';
                                    }
                                    else 
                                    {
                                        echo '全天';
                                    }
                                ?>
                              </td>
                              <td>
                              	<?=$a['type']==1?"工作":"休息"?>
                              </td>
                              <td><?=$a['thing'];?></td>
                              <td><?php echo date('Y-m-d', $a['op_time']);?></td>
                              <td class="operat">
                                <a href="javascript:;" class="t_delete XT-del" _val="<?=_get_key_val($a['id'])?>" _id="<?php echo _get_key_val($agid);?>"><i></i>删除</a>
                                <a href="javascript:;" class="t_editor XT-modify" _val="<?=_get_key_val($a['id'])?>"><i></i>编辑</a>
                              </td>
                            </tr>
                            <?php endforeach;?>
                           
                        </table>
                        <table cellpadding="0" cellspacing="0" bordercolor="#eee" border="0" width="100%">
                        <tr>
                                <td colspan="2" height="32" align="right">
                                    <div class="page">
                                      <?=$list['pages']?>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

            </div>
        </div>
        <div class="help_bottom"></div>
    </div> 
</div>
<!--mainbody-->
<?php include_once(VIEWPATH."public/footer.php");?>
<div class="popover-mask"></div>
<div class="popover complaint addcust">
  <div class="compl_top"><span class="fl">添加档期</span><input type="hidden" name="sid" id="sid" value=""><a href="javascript:;" title="关闭" class="close fr TX-win-close">×</a></div>
  <div class="compl_con">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <input type="hidden" name="userid" value="<?php echo _get_key_val($agid)?>"/>
            <tr>
              <td width="80"><font>开始时间：</font></td>
              <td><input name="dodate" id="dodate" type="text" class="txt" placeholder="例：2015-08-14" onclick="J.calendar.get();"/></td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td width="80"><font>结束时间：</font></td>
              <td><input name="enddate" id="enddate" type="text" class="txt" placeholder="例：2015-08-15" onclick="J.calendar.get();"/></td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
                <td width="80"><font>时间区间：</font></td>
            	<td>
            		<select name="time_zone" id="time_zone" class="txt" style="width:310px;">
            		  <option value="0">全天</option>
            		  <option value="1">上午</option>
            		  <option value="2">下午</option>
            		  <option value="3">晚上</option>
            		</select>
            	</td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
            	<td width="80"><font>类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型：</font></td>
            	<td>
            		<input type="radio" name="type" value="1" checked="checked"/>工作&nbsp;&nbsp;
            		<input type="radio" name="type" value="2"/>休息
            	</td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td valign="top"><font>行&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程：</font></td>
              <td><textarea class="txt text" name="thing" id="thing" cols="" rows="" maxlength="30" style="height:60px;" placeholder="请确保在50个字以内"></textarea></td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td>&nbsp;</td>
              <td><input class="but" id="TX-create" name="" type="button" value="添加"/></td>
            </tr>
        </table>
    </div>
</div>
</body>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>common.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery.SuperSlide.2.1.1.js"></script>
<script>jQuery(".txtScroll-top").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"topLoop",autoPlay:true});</script>
<script type="text/javascript" src="<?php echo _get_cfg_path('lib')?>datepicker/lhgcore.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('lib')?>datepicker/lhgcalendar.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>pages/m/schedule.js"></script>
<script>
$(function(){
	$(".TX-win-open-schedule").click(function(){
		$("#dodate").val("");
		$("#enddate").val("");
		$("input[value='1']").attr("checked","checked");
		$("#thing").val("");
		$('#sid').val("");
		
		$('.popover-mask').show();
		$('.popover-mask').height($(document).height());
		$('.popover').slideDown(200);
	});
})
</script>
</html>